-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pass variables into grid_renderer #769
base: master
Are you sure you want to change the base?
Conversation
Use a similar approach as in EIO_RenderImage, making variables available at renderer/datasource level. It should fix mapnik#768.
Can you please add test cases for this? |
Codecov Report
@@ Coverage Diff @@
## master #769 +/- ##
==========================================
+ Coverage 96.23% 96.23% +<.01%
==========================================
Files 42 42
Lines 8810 8813 +3
==========================================
+ Hits 8478 8481 +3
Misses 332 332
Continue to review full report at Codecov.
|
@flippmoke, I will be more than happy to add some tests for this one 👍 . However, I find it a bit difficult as there are no tests for the Postgis input plugin and I don't know about other plugins (I checked shape, geojson, and memory ones) supporting the variables functionality. How should I proceed? Should I change the CI scripts to install PosgreSQL/Postgis to test it? Thanks 😄 . |
@flippmoke, I'm really willing to add the test for this one. How should I proceed? |
I believe the render tests for grid renderer are located here -- https://github.com/mapnik/node-mapnik/blob/master/test/grid.test.js It looks like the vector tile renderer already supports this --- https://github.com/mapnik/node-mapnik/blob/master/src/mapnik_vector_tile.cpp#L5174. So it has some tests here: https://github.com/mapnik/node-mapnik/blob/master/test/vector-tile.test.js#L2664 Those are probably your best examples. Could we do this with out the postgis plugin but using another plugin? |
I think only postgis and pgraster plugins support variables atm. |
This is a fairly small and safe change that we integrated moths ago into our fork and has been running in our production premises ever since. Anyway, now we can take advantage of the support for postgis tests added here (thanks!): #809 I'll take a look whenever I have a chance to write a few tests for it... |
👍 @rafatower after #884 we're all 🍏 as far as tests. Please create a new PR (or I guess add to this one) when you have tests in place and then I'll merge. |
Use a similar approach as in EIO_RenderImage, making variables available at renderer/datasource level.
It should fix #768.